package com.haojin.java;
import java.util.Scanner;
// 利用面向对象的编程方法，设计类Circle计算圆的面积
public class CircleTest {
public static void main(String[] args) {
	Circle s = new Circle();
	Scanner input = new Scanner(System.in);
	System.out.println("请输入圆的半径:");
	double r = input.nextDouble();
	double areas1 = s.circle(r);
	System.out.println("圆的面积是："+areas1);
}
}
class Circle{
	double areas;
	
	public double circle(double i){
		areas = Math.PI * i * i;
		return areas;
	}
}